#这是一个猜数字游戏
import random

guessesTaken=0

print("hello! 你叫什么名字")
myName=input()

number=random.randint(1,20)
print('well,'+myName+',我认为这个数字是从1开始到20结束')

while guessesTaken<6:
    print('Take a guess.')
    guess=input()
    guess=int(guess)

    guessesTaken=guessesTaken+1

    if guess<number:
        print('你的值太小')

    if guess>number:
        print('你的值太大')

    if guess==number:
        print('恭喜你，'+myName+",答对了！！！")

    if guess!=number:
        number=str(number)
        print('Nope. The number I was thinking of was ' + number)
